﻿using Microsoft.EntityFrameworkCore;
using Volo.Abp.Data;
using Volo.Abp.FeatureManagement.EntityFrameworkCore;
using Volo.Abp.Identity.EntityFrameworkCore;
using Volo.Abp.PermissionManagement.EntityFrameworkCore;
using Volo.Abp.SettingManagement.EntityFrameworkCore;
using Volo.Abp.TenantManagement.EntityFrameworkCore;

namespace Tool.Data
{
    [ConnectionStringName("Default")]
    public class ToolDbContext : IdentityDbContext
    {
        public ToolDbContext(DbContextOptions<IdentityDbContext> options)
            : base(options)
        {
        }

        protected override void OnModelCreating(ModelBuilder builder)
        {
            base.OnModelCreating(builder);
            builder.ConfigureIdentity();
            builder.ConfigurePermissionManagement();
            builder.ConfigureTenantManagement();
            builder.ConfigureSettingManagement();
            builder.ConfigureFeatureManagement();
        }
    }
}
